<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>支付成功</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
            margin: 0;
        }
        .clock {
            width: 80%;
            max-width: 400px;
            height: 60px;
            background-color: #4caf50;
            color: white;
            text-align: center;
            line-height: 60px;
            border-radius: 8px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
            font-size: 20px;
            transition: background-color 0.5s;
        }
        .clock:hover {
            background-color: #45a049;
        }
    </style>
</head>
<body>
<div class="clock">
    支付成功，5秒后关闭窗口！
</div>
<script>
    let i = 5;
    let timer = setInterval(() => {
        i--;
        document.querySelector(".clock").innerHTML = "支付成功，" + i + "秒后关闭窗口！";
        if (i === 0) {
            clearInterval(timer); // 清空定时器
            window.close();
        }
    }, 1000);
</script>
</body>
</html>
